import CountUI from '../../components/Count'

import {connect} from 'react-redux'

function mapStateToProps(state) {
  return {count:state}
}

function mapDispatchToProps(dispatch){
  return {
    jia:(data)=>{dispatch({type:'increment',data})},
    jian:data =>{dispatch({type:'decrement',data})}
  }
}

export default connect(mapStateToProps,mapDispatchToProps)(CountUI)
